<?php
namespace StaticFactory;

class Test
{
    public function __construct()
    {
        //注册自动加载
        spl_autoload_register('autoload');
    }

    public function autoload($class)
    {
        require dirname(__FILE__) . '/' . $class . '.php';
    }

    public function index()
    {
        $obj = StaticFactory::factory('number');

        $obj->show();
    }
}


